package com.controller;

import com.pojo.User;
import com.service.UserService;
import com.vo.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController

@RequestMapping("/Users")
public class UserController {
    @Resource
    private UserService userService;
    @RequestMapping("/selectUserByPlotid")
    public Result selectUserByPlotid(Integer plotid){
        List<User> userList = userService.selectUserByPlotId(plotid);
        return Result.success(userList);
    }
    @RequestMapping("/selectAllUserByPortId")
    public Result selectAllUserByPortId(){
        List<User> userList = userService.selectAllUserByProtId();
        return Result.success(userList);
    }
}
